using System;
namespace Net35.Xrm.Sdk
{
	internal static class TypeExtensions
	{
		public static string GetLogicalName(this Type type)
		{
			return KnownProxyTypesProvider.GetInstance(true).GetNameForType(type);
		}
		public static Type GetUnderlyingType(this Type type)
		{
			return Nullable.GetUnderlyingType(type) ?? type;
		}
		public static bool IsA<T>(this Type type)
		{
			return type.IsA(typeof(T));
		}
		public static bool IsA(this Type type, Type referenceType)
		{
			return referenceType != null && referenceType.IsAssignableFrom(type);
		}
	}
}
